<%--

    Copyright (C) 2009 alex <me@alex.0x08.org>

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

--%>

<%-- 
    Document   : netbsd
    Created on : 04.11.2010, 0:41:34
    Author     : alex
--%>
<%@page contentType="text/html" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>

<%@ include file="/common/taglibs.jsp"%>

<stripes:layout-definition>
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
        <head profile="http://gmpg.org/xfn/11">
            <title>The NetBSD Support: ${title}</title>
            <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
            <link rel="stylesheet" type="text/css" media="all" href="<c:url value='/css/style.css'/>" />
            <link rel="shortcut icon" href="<c:url value='/favicon.ico'/>" />

            <stripes:layout-component name="html-head"/>
        </head>

        <body>

            <noscript>
                <div class="warning">
                    <fmt:message key="web.no-javascript.warning"/>
                </div>
            </noscript>
            <h1 class="sitehead">The NetBSD Support<br />
                "All hail to NetBSD"</h1>

            <div id="top-container">
                <div style="float:right;">
                    <%-- supported locales list  --%>

                    <c:forEach var="locale" items="${bzManager.availableLocales}">
                        <c:choose>
                            <c:when test="${locale eq bzManager.associatedLocale }">
                                <span class="flag_current">
                                    <a href="<c:url value='/lang/${locale.code}'/>"  title="${locale.desc}">
                                        <img  src="<c:url value='${locale.icon}'/>" alt="${locale.desc}" />
                                    </a>
                                </span>

                            </c:when>

                            <c:otherwise>
                                <span class="flag">
                                    <a href="<c:url value='/lang/${locale.code}'/>"  title="${locale.desc}">
                                        <img src="<c:url value='${locale.icon}'/>" alt="${locale.desc}" border="0"/>
                                    </a>
                                </span>
                            </c:otherwise>

                        </c:choose>
                    </c:forEach>
                    <br/>
                </div>
                <div style="clear:both;">

                </div>
            </div>
            <hr style="border: none;"/>

            <div class="navigation">

                <div style="float:left;">

                    <c:choose>
                        <c:when  test="${not empty bzManager.currentUser}">
                            Превед: ${bzManager.currentUser.firstName} &nbsp; ${bzManager.currentUser.lastName}
                            |
                            <stripes:link href="/act/logout">Выйти</stripes:link>
                        </c:when>
                        <c:otherwise>
                            <fieldset style="border: none;">
                               
                                <form id="auth_form"
                                      action="<c:url value='/act/login'/>"
                                      method="POST" class="form">

                                    <label for="username">логин:</label>
                                    <input name="j_username" type="text" class="username" id="username" value="" />

                                    <label for="password">пароль:</label>
                                    <input name="j_password" type="password" class="password" id="password" value="" />

                                    <input name="send" type="submit" value="Вход" />

                                    <div style="width: 50%;">
                                        <c:if test="${not empty param.error}">
                                            <div class="warning">
                                                ${sessionScope.SPRING_SECURITY_LAST_EXCEPTION.message}
                                            </div>
                                        </c:if>
                                    </div>


                                </form>
                            </fieldset>

                        </c:otherwise>
                    </c:choose>

                </div>
                <div style="float:right;">

                    <ul>
                        <c:if test='<%= request.isUserInRole("ROLE_ADMIN")%>'>
                            <li><a href="<c:url value='/admin'/>">Админка</a></li>
                        </c:if>
                        <li><a href="<c:url value='/'/>">Главная</a></li>
                        <li><a href="<c:url value='/register/stage1'/>">Регистрация</a></li>
                        <li><a href="<c:url value='/contacts'/>">Контакты</a></li>
                        <li><a href="<c:url value='/support'/>">Помощь</a></li>
                    </ul>
                </div>
                <div style="clear:both;"></div>

            </div>

            <div class="colmask leftmenu">
                <div class="colright">
                    <div class="col1wrap">
                        <div class="col1">

                            <h2>${title}</h2>
                            <stripes:messages/>
                            <stripes:layout-component name="contents"/>

                        </div>
                    </div>

                    <div class="menu">
                        <ul>
                            <li><a href="<c:url value='/about/features.jsp'/>">О проекте</a></li>
                            <li><a href="<c:url value='/gallery'/>">Галерея</a></li>
                            <li><a href="<c:url value='/releases'/>">Загрузка</a></li>
                            <li><a href="<c:url value='/docs'/>">Документация</a></li>
                            <li><a href="<c:url value='/man'/>">Справочник</a></li>
                            <li><a href="<c:url value='/support'/>">Поддержка</a></li>
                            <li><a href="<c:url value='/conference/'/>">Конференция</a></li>
                            <li><a href="<c:url value='/ports'/>">Портирование</a></li>
                        </ul>
                    </div>

                </div></div>

            <div class="footer">
                <p>
                    <a href="http://www.netbsd.org">www.netbsd.org</a> <a href="http://alex.0x08.org">alex.0x08.org</a>, 2010
                    <small>for any questions contact: <a href="mailto:me@alex.0x08.og">Alex</a> or <a href="mailto:testdev4@gmail.com">Valeriy</a></small>
                </p>
            </div>

        </body>
    </html>
</stripes:layout-definition>
